{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "95f9ff8e",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "6.97172425029945e-07 s\n",
      "6.283351660510161e-07 s 0.0006283351660510161 ms\n",
      "0.2812800407409668 s 281.2800407409668 ms\n"
     ]
    }
   ],
   "source": [
    "import cv2 as cv\n",
    "import time\n",
    "\n",
    "img1 = cv.imread('../data/messi5.jpg')\n",
    "e1 = cv.getTickCount()\n",
    "for i in range(5,49,2):\n",
    "    img1 = cv.medianBlur(img1,i)\n",
    "e2 = cv.getTickCount()\n",
    "t = (e2 - e1)/cv.getTickCount()\n",
    "print(t,'s')\n",
    "\n",
    "t1 = time.time()\n",
    "e1 = cv.getTickCount()\n",
    "for i in range(5,49,2):\n",
    "    img1 = cv.medianBlur(img1,i)\n",
    "e2 = cv.getTickCount()\n",
    "tt = (e2 - e1)/cv.getTickCount()\n",
    "t2 = time.time()\n",
    "t = t2 - t1\n",
    "print(tt,'s',tt*1000,'ms')\n",
    "print(t,'s',t*1000,'ms')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "bda4df33",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.16"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
